//
//  GoodsDetailModel.m
//  JiuLe
//
//  Created by SunChao on 16/10/13.
//  Copyright © 2016年 Fine. All rights reserved.
//

#import "GoodsDetailModel.h"

@implementation GoodsDetailModel
-(instancetype)initWithDict:(NSDictionary *)dict{
    if (self=[super init]) {
         self.goodsId = dict[@"id"];
        self.descr=dict[@"description"];
        self.type=dict[@"good_type"];
        self.stockcount = dict[@"stockcount"];
        self.standard=dict[@"standard"];
        self.discountprice =dict[@"discountprice"];
        self.price = dict[@"price"];
        self.showImage = dict[@"show_images"];
        self.introduceImages = dict[@"introduce_images"];
        self.express = dict[@"express"];
        self.goodTitle = dict[@"good_title"];
        self.score = dict[@"score"];
        self.status = dict[@"status"];
        self.pointsreward = dict[@"pointsreward"];
    }
    return self;
}
+(instancetype) appWithDict:(NSDictionary *)dict{
    
    // 为何使用self，谁调用self方法 self就会指向谁！！
    return [[self alloc] initWithDict:dict];
    
}

@end
